﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EuroManager.Domain.Simulator.Helpers;
using EuroManager.Domain.Simulator.Result;
using NUnit.Framework;

namespace EuroManager.Domain.Simulator.Tests.Result
{
    [TestFixture]
    public class PlayerDataTests
    {
        [Test]
        public void ShouldAddFrameLocation()
        {
            float x = -1;
            float y = 3;

            PlayerData data = new PlayerData(GameTeam.Team1, 3);
            data.AddFrame(x, y, 60);

            Assert.IsTrue(data.X.Contains(x) && data.Y.Contains(y));
        }

        [Test]
        public void ShouldAddFrameAngle()
        {
            float angle = 40;

            PlayerData data = new PlayerData(GameTeam.Team2, 10);
            data.AddFrame(0, 5, angle);

            Assert.IsTrue(data.Angle.Contains(angle));
        }

        [Test]
        public void ShouldAddMultipleFrames()
        {
            PlayerData data = new PlayerData(GameTeam.Team1, 5);
            data.AddFrame(1, -2, 25);
            data.AddFrame(3, 0, 17);
            data.AddFrame(5, 8, 193);

            Assert.AreEqual(3, data.X.Count());
            Assert.AreEqual(3, data.Y.Count());
            Assert.AreEqual(3, data.Angle.Count());
        }
    }
}
